﻿using IoC.Interfaces;

namespace IoC.Services
{
    public class ApplePhone : ICellPhone
    {
        public IMicroPhone MicroPhone { get; set; }

        public IHeadPhone HeadPhone { get; set; }

        public IPower Power { get; set; }

        public ApplePhone(IHeadPhone headPhone)
        {
            this.HeadPhone = headPhone;
            Console.WriteLine($"{GetType().Name} 带参构造函数！");
        }

        public virtual void Call()
        {
            Console.WriteLine($"{GetType().Name} 打电话");
        }

        public void Text()
        {
            Console.WriteLine($"{GetType().Name} 发信息");
        }
    }
}
